<?php

/**
 * @author liyi
 * @copyright 2018.12.24
 * 十点消消乐 定时任务
 */

namespace Sdgame\Controller;
use Common\Controller\ApiController;
use Think\Model;
use Think\Log;

class CrontabController extends ApiController {

    // 周一 00:00:00 定时重置排行榜数据
    public function update_rank() {
        $map['id'] = array("gt",1);
        $ret = M('users')->where($map)->save(array('good_score'=>0,'grade'=>0));
        Log::write('十点消消乐,周一更新排行榜成功','NEWS');
    }

}